import java.util.Arrays;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: atp
 * Date: 2022-10-10
 * Time: 21:37
 */
public class Test {

    public static void main(String[] args) {
        int[] array = {1,9,3,7,7,8};
        int[] array2 = Arrays.copyOf(array,3*array.length);
        System.out.println(Arrays.toString(array));
        System.out.println(Arrays.toString(array2));
    }

    //实现一个方法 printArray, 以数组为参数, 循环访问数组中的每个元素, 打印每个元素的值.
//    public static void printArray(int[] arrayTmp) {
//        for (int i = 0; i < arrayTmp.length; i++) {
//            System.out.print(arrayTmp[i]+" ");
//        }
//        System.out.println();
//    }
//    public static void main(String[] args) {
//        int[] array = new int[100];
//        for (int i = 0; i < array.length; i++) {
//            array[i] = i+1;
//        }
//        printArray(array);
//    }


}
